//
//  UserHeaderView.swift
//  worldexchange
//
//  Created by xionghao on 2019/1/10.
//  Copyright © 2019 xionghao. All rights reserved.
//

import UIKit

class UserHeaderView: UIView {

    @IBOutlet weak var signInBtn: QMUIFillButton!
    @IBOutlet weak var signUpBtn: QMUIGhostButton!
    
    @IBAction func signInClick(_ sender: QMUIButton) {
        if sender.tag == 0 {
            Utils.pushLogin()
        }else {
            Utils.pushRegister()
        }
        
    }
    
    override func awakeFromNib() {
        self.qmui_borderPosition = .bottom
        self.qmui_borderColor = UIColor.qmui_color(withHexString: "#d5d5d5")
        self.qmui_borderWidth = 0.5
        self.signInBtn.setTitle(LanguageHelper.getString(key: "SignIn"), for: UIControl.State.normal)
        self.signUpBtn.setTitle(LanguageHelper.getString(key: "SignUp"), for: UIControl.State.normal)
        self.frame = CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: 180)
    }
    
    static func loadView()->UserHeaderView{
        let userHeaderView =  Bundle.main.loadNibNamed("UserHeaderView", owner: nil, options: nil)?.first as! UserHeaderView
        return userHeaderView
    }
    
    /*
    // Only override draw() if you perform custom drawing.
    // An empty implementation adversely affects performance during animation.
    override func draw(_ rect: CGRect) {
        // Drawing code
    }
    */

}
